-- GENERATED SPELL FOR [Durnholde Mage] --


function spell0_18934(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_18934', 8268, 1)
end

function spell1_18934(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(38384,pUnit)
pUnit:RegisterEvent('Sorts_18934', 8323, 1)
end

function spell2_18934(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(13341,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18934', 535, 1)
end

function spell3_18934(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(16144,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18934', 625, 1)
end

function spell4_18934(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18934', 3000, 1)
end

function spell5_18934(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18934', 3000, 1)
end

function spell6_18934(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_18934', 0, 1)
end

function spell7_18934(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18934', 9500, 1)
end

function Sorts_18934(pUnit, Event)
local choix_sorts_18934 = math.random(0, 7)
if choix_sorts_18934 == 0 then
pUnit:RegisterEvent('spell0_18934', 1, 1)
end
if choix_sorts_18934 == 1 then
pUnit:RegisterEvent('spell1_18934', 1, 1)
end
if choix_sorts_18934 == 2 then
pUnit:RegisterEvent('spell2_18934', 1, 1)
end
if choix_sorts_18934 == 3 then
pUnit:RegisterEvent('spell3_18934', 1, 1)
end
if choix_sorts_18934 == 4 then
pUnit:RegisterEvent('spell4_18934', 1, 1)
end
if choix_sorts_18934 == 5 then
pUnit:RegisterEvent('spell5_18934', 1, 1)
end
if choix_sorts_18934 == 6 then
pUnit:RegisterEvent('spell6_18934', 1, 1)
end
if choix_sorts_18934 == 7 then
pUnit:RegisterEvent('spell7_18934', 1, 1)
end
end

function mob18934_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18934', math.random(1500, 3000), 1)
end

function mob18934_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18934_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18934_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18934, 1, 'mob18934_Action')
RegisterUnitEvent(18934, 2, 'mob18934_Leave')
RegisterUnitEvent(18934, 3, 'mob18934_Kill')
RegisterUnitEvent(18934, 4, 'mob18934_Die')
